
#include "winsock2.h"
#include "lclog.h"
#include "SearchCall.h"
#include "memfun.h"
#include <deftype.h>
#ifndef _HOOKSOCK_H_
#define _HOOKSOCK_H_
extern int
(WSAAPI * 
 lcRealWSASend)(
 IN SOCKET s,
 IN LPWSABUF lpBuffers,
 IN DWORD dwBufferCount,
 OUT LPDWORD lpNumberOfBytesSent,
 IN DWORD dwFlags,
 IN LPWSAOVERLAPPED lpOverlapped,
 IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
 ); 
extern int (WSAAPI * lcRealSend)(
						  IN SOCKET s,
						  IN const char FAR * buf,
						  IN int len,
						  IN int flags
						  );
extern int
(WSAAPI * 
 lcRealWSARecv)(
 SOCKET s,
 LPWSABUF lpBuffers,
 DWORD dwBufferCount,
 LPDWORD lpNumberOfBytesRecvd,
 LPDWORD lpFlags,
 LPWSAOVERLAPPED lpOverlapped,
 LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
    );

extern int (WSAAPI * lcRealRecv)(IN SOCKET s, OUT char FAR * buf, IN int len, IN int flags);


int WINAPI lcWSASend(
					 IN SOCKET s,
					 IN LPWSABUF lpBuffers,
					 IN DWORD dwBufferCount,
					 OUT LPDWORD lpNumberOfBytesSent,
					 IN DWORD dwFlags,
					 IN LPWSAOVERLAPPED lpOverlapped,
					 IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
					 );
int WINAPI lcSend( IN SOCKET s, OUT char FAR * buf,IN int len, IN int flags);

int WSAAPI lcWSARecv(SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags,
		  LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);

int WINAPI lcRecv(SOCKET s, char FAR * buf,int len,int flags);
int HookWSARecv();
int HookWSASend();
int HookRecv();
int HookSend();
#endif